package com.designpattern.proxy;

/**
 * 外卖小哥
 */
public class WaiMaiXiaoGeProxy extends FindFangZi {
    /**
     * 老板，真实的角色（真正做饭的人）
     */
    private Boss boss;

    public WaiMaiXiaoGeProxy(Order order) {
        this.boss = new Boss();
        boss.setOrder(order);
    }

    /**
     * 外卖小哥 送餐
     */
    void findFangZi() {
        System.out.println("顾客姓名:" + boss.getOrder().getName());
        System.out.println("顾客地址:" + boss.getOrder().getAddress());
    }
}
